Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Time #56

Merged
merged 14 commits into from
Feb 11, 2024
Merged

Refactor Time #56

merged 14 commits into from
Feb 11, 2024

Conversation

AngusGMorrison
Copy link
Contributor

@AngusGMorrison AngusGMorrison commented Feb 9, 2024

Resolves #55.

Refactors Time by making it generic over implementations of the TimeScale marker trait.

crates/lox_core/src/time/continuous.rs Show resolved Hide resolved
crates/lox_core/src/time/continuous.rs Outdated Show resolved Hide resolved
crates/lox_core/src/time/continuous.rs Show resolved Hide resolved
crates/lox_py/src/coords.rs Outdated Show resolved Hide resolved
crates/lox_py/src/coords.rs Outdated Show resolved Hide resolved
crates/lox_py/src/time.rs Outdated Show resolved Hide resolved
Copy link
Member

@helgee helgee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the states module concrete should resolve some problems in the Python world.

crates/lox_core/src/coords/states.rs Outdated Show resolved Hide resolved
crates/lox_core/src/coords/two_body.rs Outdated Show resolved Hide resolved
crates/lox_core/src/coords/two_body.rs Outdated Show resolved Hide resolved
crates/lox_core/src/time/continuous.rs Outdated Show resolved Hide resolved
crates/lox_py/src/time.rs Outdated Show resolved Hide resolved
crates/lox_py/src/coords.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 10, 2024

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (69335a5) 97.85% compared to head (fce045e) 97.82%.

Files Patch % Lines
crates/lox_core/src/time/continuous.rs 95.46% 20 Missing ⚠️
crates/lox_py/src/time.rs 89.36% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
- Coverage   97.85%   97.82%   -0.04%     
==========================================
  Files          42       41       -1     
  Lines       17376    17398      +22     
==========================================
+ Hits        17003    17019      +16     
- Misses        373      379       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@helgee helgee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

#[test]
fn test_unscaled_time_centuries_since_j2000() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend the rstest crate for parametrising test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to ask about whether we wanted to standardise. I'll update them to rstest in a separate PR.

@AngusGMorrison AngusGMorrison merged commit 39e31a1 into main Feb 11, 2024
22 of 24 checks passed
@helgee helgee deleted the am/refactor-time branch February 11, 2024 11:39
This was referenced Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Replace continuous::Time enum with trait
2 participants